package models.msgs;

public class Cards {
	
	
        final int rank;
        final String color;
        final char Figure;
	    
	    public int getRank() {
			return rank;
		}
	    
	    public String getColor() {
			return color;
		}

		public char getFigure(){
			return Figure;
		}
        //---Konstruktor---//
		public Cards(int rank, int c) {
	    
	    this.rank = rank;
	        

		if(c == 0)                                         //w tej klasie przechowujemy Figure(char), rank(int) i color(string)
			color="SPADE";
		else if(c == 1)
			color="CLUB";
		else if(c == 2)
			color="HEART";
		else
			color="DIAMOND";


	    this.Figure = Figure(this.rank).charAt(0);

	    }

	    public static String Figure(int V){

		if(V>=2 && V<10)

		      return Integer.toString(V);
		else if(V==1)
			return "A";
		else if(V==10)
			return "T";
		else if(V==11)
			return "J";
		else if(V==12)
			return "Q";
		else 
			return "K";
	}




}